package com.yj.suncity.activity.shouye.bean;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONObject;

public class ShouyeListBean {
	  private String success;//": "1",
	  private String msg;//": "获取信息成功",
	  private JSONObject data;//": {
	  
	  private List<ShouyeGoodsBean> goodsTjBeans;
	  private List<ShouyeGoodsBean> goodsCxBeans;
	//  private List<ShouyeGoodsBean> goodsBeans;
	  private List<ShouyeActivityBean> activityBeans;
	  private List<ShouyeSuperadvBean> superadvBeans;
	  private List<ShouyeEntBeans> entBeans;
	  private List<ShouyePlacardBeans> placardBeans;
	  
	  
	public ShouyeListBean(JSONObject json) {
		this.success = json.optString("success");
		this.msg = json.optString("msg");
		this.data = json.optJSONObject("data");
		
	//	this.goodsBeans=new ArrayList<ShouyeGoodsBean>();
		this.goodsTjBeans = new ArrayList<ShouyeGoodsBean>();
		this.goodsCxBeans = new ArrayList<ShouyeGoodsBean>();
		this.activityBeans = new ArrayList<ShouyeActivityBean>();
		this.superadvBeans = new ArrayList<ShouyeSuperadvBean>();
		this.entBeans=new ArrayList<ShouyeEntBeans>();
		this.placardBeans=new ArrayList<ShouyePlacardBeans>();
		
		if (data!=null) {
			JSONArray array=data.optJSONArray("superadv");
			if (array!=null) {
				for (int i = 0; i < array.length(); i++) {
					JSONObject item=array.optJSONObject(i);
					if (item!=null) {
						this.superadvBeans.add(new ShouyeSuperadvBean(item));
					}
				}
			}
			
			
			
			JSONArray array1=data.optJSONArray("tjgoods");
			if (array1!=null) {
				for (int i = 0; i < array1.length(); i++) {
					JSONObject item=array1.optJSONObject(i);
					if (item!=null) {
						this.goodsTjBeans.add(new ShouyeGoodsBean(item));
					}
				}
			}
			
			JSONArray array2=data.optJSONArray("cxgoods");
			if (array2!=null) {
				for (int i = 0; i < array2.length(); i++) {
					JSONObject item=array2.optJSONObject(i);
					if (item!=null) {
						this.goodsCxBeans.add(new ShouyeGoodsBean(item));
					}
				}
			}
//			
			JSONArray array3=data.optJSONArray("placard");
			if (array3!=null) {
				for (int i = 0; i < array3.length(); i++) {
					JSONObject item=array3.optJSONObject(i);
					if (item!=null) {
						this.placardBeans.add(new ShouyePlacardBeans(item));
					}
				}
			}
			
			JSONArray array4=data.optJSONArray("activity");
			if (array4!=null) {
				for (int i = 0; i < array4.length(); i++) {
					JSONObject item=array4.optJSONObject(i);
					if (item!=null) {
						this.activityBeans.add(new ShouyeActivityBean(item));
					}
				}
			}
			
			JSONArray array5=data.optJSONArray("ent");
			if (array5!=null) {
				for (int i = 0; i < array5.length(); i++) {
					JSONObject item=array5.optJSONObject(i);
					if (item!=null) {
						this.entBeans.add(new ShouyeEntBeans(item));
					}
				}
			}
			
		}
	}
	
	
	
	public List<ShouyePlacardBeans> getPlacardBeans() {
		return placardBeans;
	}

	public List<ShouyeEntBeans> getEntBeans() {
		return entBeans;
	}

	public List<ShouyeGoodsBean> getGoodsTjBeans() {
		return goodsTjBeans;
	}

	public List<ShouyeGoodsBean> getGoodsCxBeans() {
		return goodsCxBeans;
	}

	public String getSuccess() {
		return success;
	}
	public String getMsg() {
		return msg;
	}
	public JSONObject getData() {
		return data;
	}
//	public List<ShouyeGoodsBean> getGoodsBeans() {
//		return goodsBeans;
//	}
	public List<ShouyeActivityBean> getActivityBeans() {
		return activityBeans;
	}
	public List<ShouyeSuperadvBean> getSuperadvBeans() {
		return superadvBeans;
	}
	  

}
